package com.zuoye.day03;

public class Account {
    private int accNo;
    private String accName;
    private int accPassword;
    private long accTelno;
    private float accBalance;
    private int accType;

    //构造函数

    //有参
    public Account(int accNo,String accName,int accPassword,long accTelno,float accBalance,int accType){
        this.accNo = accNo;
        this.accName = accName;
        this.accPassword = accPassword;
        this.accTelno = accTelno;
        this.accBalance = accBalance;
        this.accType = accType;
    }
    //无参
    public Account(){

    }

    //存钱
    public float depoist(float balance){
        accBalance += balance;
        return accBalance;
    }
    //取钱
    public float  withdraw(float balance){
        if(accBalance > balance){
            accBalance -= balance;
            return accBalance;
        }else {
            System.out.println("余额不足");
        }
        return accBalance;
    }


    public Account fun1(){
        return  null;
    }
    public Account fun2(){
        return   new Account();
    }

    public Account fun3(){
        return    this;
    }

    public int fun4(){
        return  0;
    }


    public int getAccNo() {
        return accNo;
    }

    public void setAccNo(int accNo) {
        this.accNo = accNo;
    }

    public String getAccName() {
        return accName;
    }

    public void setAccName(String accName) {
        this.accName = accName;
    }

    public int getAccPassword() {
        return accPassword;
    }

    public void setAccPassword(int accPassword) {
        this.accPassword = accPassword;
    }

    public long getAccTelno() {
        return accTelno;
    }

    public void setAccTelno(long accTelno) {
        this.accTelno = accTelno;
    }

    public float getAccBalance() {
        return accBalance;
    }

    public void setAccBalance(float accBalance) {
        this.accBalance = accBalance;
    }

    public int getAccType() {
        return accType;
    }

    public void setAccType(int accType) {
        this.accType = accType;
    }

}
